Deploy Compliance Auditor to Vercel
1. Push code to GitHub
From the ChessTutor repo root (parent of compliance-auditor):
git add .
git commit -m "Compliance Auditor: CMMC Level 2, Coast Guard UI, Audit Log"
git push origin main
If compliance-auditor is a submodule, commit and push from its directory first, then update the parent repo.
2. Import project in Vercel
- Go to vercel.com and sign in (GitHub).
- Click Add New β Project.
- Import your ChessTutor (or
compliance-auditor) repository. - Root Directory: set to
compliance-auditor(not the repo root). - Framework Preset: Next.js (auto-detected).
- Build Command:
npm run build(default). - Output Directory: leave default.
3. Environment variables
In Project Settings β Environment Variables, add:
| Name | Value | Environments |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Your Supabase project URL | Production, Preview, Development |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anon key | Production, Preview, Development |
SUPABASE_SERVICE_ROLE_KEY |
Supabase service role key | Production, Preview, Development |
OPENAI_API_KEY |
Your OpenAI API key | Production, Preview, Development |
ANTHROPIC_API_KEY |
Your Anthropic API key | Production, Preview, Development |
Copy values from .env.local (never commit that file).
4. Supabase Auth redirect URLs
- Supabase Dashboard β Authentication β URL Configuration.
- Add to Redirect URLs:
https://your-app.vercel.app/**https://your-app.vercel.app/auth/callback- Replace
your-appwith your Vercel project name or custom domain.
5. Deploy
- From Vercel UI: Click Deploy after configuring the project.
- From CLI: In
compliance-auditor, run:
cd compliance-auditor
npx vercel
Follow prompts, link the project if needed, then:
npx vercel --prod
6. Post-deploy
- Open your Vercel URL (e.g.
https://your-app.vercel.app). - Sign up / log in and test upload, analysis, and Audit Log.
- Confirm redirect URLs work (e.g. after email confirm or OAuth).
Troubleshooting
| Issue | Fix |
|---|---|
| Build fails | Check Vercel build logs; ensure Root Directory = compliance-auditor. |
| "Unauthorized" / auth errors | Verify env vars and Supabase redirect URLs. |
| API routes 500 | Ensure OPENAI_API_KEY and ANTHROPIC_API_KEY are set in Vercel. |